<?php
include_once('config.php');

if($_POST['popup']=='cohoinghenghiep'){
	$detail = $tc->cohoi_nghenghiep_detail($_POST['id']);
	$row = mysql_fetch_array($detail);
	echo '<div id="popupContact"><div id="popupContactClose"><img src="images/popupClose.png" align="popup Close" /></div>
		<div id="popupContent"><h1>'.$row['name'].'</h1><p id="yeucau">Yêu cầu kỹ năng</p>'.$row['content'].'</div>
	</div><div id="backgroundPopup"></div>';	
}

if($_POST['contact']=='contact'){
	$name = trim($_POST['name']);
	$email = trim($_POST['email']);
	$address = trim($_POST['address']);
	$tel = trim($_POST['tel']);
	$comment = trim($_POST['comment']);
	if(strlen($name)>2 && strlen($email)>6 && strlen($address)>6 && strlen($comment)>6){
		include_once('guimail/send.php');
		echo 1;
		return true;
	}else{
		echo 0;
		return false;
	}
}